/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package test;

import java.util.Scanner;

/**
 *
 * @author ddpc
 */
public class clave {

    String pass;
    Scanner teclado;

    clave() {
        teclado = new Scanner(System.in);
        System.out.println("Introduce la clave:");
        pass = teclado.nextLine();
    }

    public void comprobarclave() {
        if (pass.equals("123abc")) {
            System.out.println("Has introducido bien la clave");
        } else {
            System.out.println("No coinciden");
        }
    }

    public static void main(String[] args) {
        clave x = new clave();
        x.comprobarclave();
    }
}
